package ms.unicorn.ui.figures;

import ms.unicorn.ui.borders.RoundedSchemeBorder;

import org.eclipse.draw2d.Graphics;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;

public class EntityRoundRectangle extends NodeFigure {
	
	public EntityRoundRectangle() {
		setBorder(new RoundedSchemeBorder());
	}
	
	@Override
    protected void paintFigure(Graphics graphics) {
        paintShadow(graphics);
        // otherwise stay transparent
    }

    protected void paintShadow(Graphics graphics) {
        super.paintBorder(graphics);
    }

    @Override
    protected void paintBorder(Graphics graphics) {
        //do nothing. we paint the border before the rest of the figure as it is where we paint the shadow.
    }
}
